package com.daJiao.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daJiao.entity.SysAddress;
import com.daJiao.mapper.SysAddressMapper;
import com.daJiao.service.SysAddressService;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>Title:      SysAddressServiceImpl. </p>
 * <p>Description 省市区地址编码 </p>
 * <p>Copyright: Copyright (c) 2016</p>
 * <p>Company:    医百科技有限公司 </p>
 *
 * @author         <a href="yangwensheng@100doc.com.cn"/>杨文生</a>
 * @since      2022/4/16 10:21
 */
@Service
@CacheConfig(cacheNames = "address")
public class SysAddressServiceImpl extends ServiceImpl<SysAddressMapper,SysAddress> implements SysAddressService {

    @Resource
    private SysAddressMapper sysAddressMapper;

    @Override
    public List<SysAddress> getChildrenByParentCode(String parentCode) {
        return sysAddressMapper.getChildrenByParentCode(parentCode);
    }

    @Override
    public List<SysAddress> getAll() {
        return sysAddressMapper.getAll();
    }

}
